using AutoMapper;
using HCD.Entities;

namespace HCD.User.Dtos
{

    /// <summary>
    /// 配置ProjectPersonal的AutoMapper映射
    /// 前往 <see cref="EnterpriseApplicationModule"/>的AbpAutoMapper配置方法下添加以下代码段
    /// ProjectPersonalDtoAutoMapper.CreateMappings(configuration);
    /// </summary>
    public static class CustomUserMapper
    {
        public static void CreateMappings(IMapperConfigurationExpression configuration)
        {
            configuration.CreateMap<StaffDictV,UserDto>().ForMember(p=>p.Id,opt=>opt.Ignore());
            configuration.CreateMap<UserEntity, UserDto>();
            configuration.CreateMap<StaffDictV,UserMiniDto>().ForMember(p=>p.Id,opt=>opt.Ignore());
            configuration.CreateMap<UserEntity, UserMiniDto>();

            configuration.CreateMap<UserAddInput, UserEntity>();

            configuration.CreateMap<UserEditInput, UserEntity>();
            

        }
    }
}
